package com.mmall.seckill.service;

import com.mmall.seckill.common.Result;
import com.mmall.seckill.domain.SeckillUser;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model;

import java.awt.image.BufferedImage;

/**
 * Created by megan on 2018/6/19.
 * 秒杀核心业务
 */
public interface SeckillService {

    @Transactional
    Result miaosha(Long goodsId, SeckillUser user);

    @Transactional
    Result miaoshaV2(Long goodsId, SeckillUser user);

    Long getMiaoshaResult(Long userId,Long goodsId);

    String createMiaoshaPath(SeckillUser user, Long goodsId);

    Boolean checkPath(SeckillUser user, Long goodsId,String path);

    BufferedImage createMiaoshaVerifyCode(SeckillUser user, Long goodsId);
}
